package com.zy.ems.common.enums;

public enum InvoiceItem {
    //
    officeSupply(1, "办公用品", false),
    //
    shoe(2, "鞋帽", false),
    //
    cloth(3, "服装", false),
    //
    Cosmetics(4, "化妆品", false),
    //
    textile(5, "针纺织品", false),
    //
    craft(6, "工艺品", false),
    //
    bag(7, "箱包", false),
    //
    commodity(8, "日用品", false),
    //
    gift(9, "礼品", false),
    //
    detail(10, "商品明细", false);

    private int id;

    private String text;

    private boolean disable;

    private InvoiceItem(int id, String text, boolean disable) {
        this.id = id;
        this.text = text;
        this.disable = disable;
    }

    public static InvoiceItem[] getAllInfo() {
        return values();
    }

    public static InvoiceItem getInfo(int itemId) {
        for (InvoiceItem item : values()) {
            if (itemId == item.getId()) {
                return item;
            }
        }
        return bag;
    }

    public int getId() {
        return id;
    }

    public String getText() {
        return text;
    }

    public boolean isDisable() {
        return disable;
    }

}
